home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Development
/
Source
/
MSG Graphic Effects 1.0 Source
/
Usage.note
< prev
Wrap
Text File
|
1993-08-23
|
1KB
|
27 lines
/*
How to use these graphics effects:
- Each effect is passed a GrafPtr, which is an off-screen bitmap that has the
picture you want to eventually get on the on-screen window. You must create
this GrafPtr yourself and draw the picture on it, then call the graphic
effect routine.
- The on-screen destination window is named gMainWindow (as defined in
"msg misc.h", although you could change this to a #-define if you have
another name for your on-screen window). gMainWindow's dimensions are
given as MAIN_WINDOW_HEIGHT and MAIN_WINDOW_WIDTH, which are #-defined in
"msg misc.h".
- Some graphics effects need to allocate memory (e.g. dissolve). If there is
no memory available, the procedure will call ErrorString(Str255, Str255),
which puts up an alert and exits the program. (This procedure is not
included. Ideally, you should check for memory _before_ you call routines
that allocate memory, so you won't need this anyway.)
- To ensure that graphics effects run at the same speed on all machines,
"msg timing" contains procedures to do time corrections based on the tick
count, which is a standard speed on all machines. Each graphics effect
calls StartTiming() in the beginning of its inner loop, and calls
TimeCorrection(CorrectTime) at the end of the inner loop. CorrectTime is
#-defined for each graphic effect.
*/